Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RHOAIENG-17256: install necessary base OS package to make Knit rendering of R markup to PDF possible #798

Conversation

shalberd
Copy link
Contributor

@shalberd shalberd commented Dec 5, 2024

https://issues.redhat.com/browse/RHOAIENG-17256

fixes #794

A coworker pointed me to problems he was having converting R markup code to PDF with RStudio.

Description

install needed OS package

How Has This Been Tested?

I took a recent notebooks R Studio image, built a custom image installing the package with yum, then ran
the new workbench image in ODH and was able to produce the PDF rendered from Rmd markup with Knit, it showed up in a popup window.

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

Copy link
Contributor

openshift-ci bot commented Dec 5, 2024

Hi @shalberd. Thanks for your PR.

I'm waiting for a opendatahub-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@shalberd
Copy link
Contributor Author

shalberd commented Dec 6, 2024

/retest

@shalberd
Copy link
Contributor Author

shalberd commented Dec 10, 2024

@jiridanek @jstourac @guimou tested with built image quay.io/opendatahub/workbench-images:rstudio-c9s-python-3.9-pr-798

again showing old image behavior vs new pr-797 behavior:

image

Knit to PDF button:

image

Render process leads to error:

processing file: Test2.Rmd                                                                                            
/usr/lib/rstudio-server/bin/quarto/bin/tools/pandoc +RTS -K512m -RTS Test2.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output Test2.tex --lua-filter /opt/app-root/src/Rpackages/4.3/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /opt/app-root/src/Rpackages/4.3/rmarkdown/rmarkdown/lua/latex-div.lua --embed-resources --standalone --highlight-style tango --pdf-engine pdflatex --variable graphics --variable 'geometry:margin=1in'

output file: Test2.knit.md

! LaTeX Error: File `framed.sty' not found.

! Emergency stop.
<read *>
Error: LaTeX failed to compile Test2.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Test2.log for more info.

changed workbench image to quay.io/opendatahub/workbench-images:rstudio-c9s-python-3.9-pr-798`

Testing with markdown to PDF no longer leads to error, rendering fine.

image

@shalberd shalberd force-pushed the RStudio_make_R_markup_to_PDF_rendering_work branch from 1b049d9 to 345dc59 Compare December 18, 2024 12:25
@shalberd
Copy link
Contributor Author

shalberd commented Dec 18, 2024

Hi @atheo89
moved package install to different section, see code change.

image built at e.g. quay.io/opendatahub/workbench-images:rstudio-c9s-python-3.9-pr-798

I do not have time to test it again as I did described in this thread last week, but should be good, right?

@shalberd shalberd requested a review from atheo89 December 18, 2024 15:24
@shalberd
Copy link
Contributor Author

/retest

@shalberd shalberd force-pushed the RStudio_make_R_markup_to_PDF_rendering_work branch from 345dc59 to 5439de0 Compare December 20, 2024 12:46
@shalberd
Copy link
Contributor Author

shalberd commented Dec 20, 2024

@atheo89 @jiridanek I see, python 3.9 R Studio removed from main ... I rebased, concept stays :-)

@atheo89
Copy link
Member

atheo89 commented Dec 20, 2024

Hi @shalberd I just reviewed this work. Everything looks good 🙂
Test the image with the changes that made yesterday and I’m getting the same results as you.

Thank you for fixing this!

image

/lgtm

@shalberd
Copy link
Contributor Author

@atheo89 all good except those offbeat / flaky tests CICD

@shalberd
Copy link
Contributor Author

/retest-required

Copy link
Contributor

openshift-ci bot commented Dec 21, 2024

@shalberd: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/runtimes-ubi9-e2e-tests 345dc59 link true /test runtimes-ubi9-e2e-tests
ci/prow/intel-notebooks-e2e-tests 345dc59 link true /test intel-notebooks-e2e-tests
ci/prow/rocm-notebooks-e2e-tests 345dc59 link true /test rocm-notebooks-e2e-tests
ci/prow/rocm-runtimes-ubi9-e2e-tests 345dc59 link true /test rocm-runtimes-ubi9-e2e-tests
ci/prow/notebooks-ubi9-e2e-tests 345dc59 link true /test notebooks-ubi9-e2e-tests
ci/prow/codeserver-notebook-e2e-tests 345dc59 link true /test codeserver-notebook-e2e-tests

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@jiridanek
Copy link
Member

/override ci/prow/rstudio-notebook-e2e-tests
/override ci/prow/images

Copy link
Contributor

openshift-ci bot commented Dec 23, 2024

@jiridanek: Overrode contexts on behalf of jiridanek: ci/prow/images, ci/prow/rstudio-notebook-e2e-tests

In response to this:

/override ci/prow/rstudio-notebook-e2e-tests
/override ci/prow/images

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@jiridanek jiridanek changed the title install necessary base OS package to make Knit rendering of R markup to PDF possible RHOAIENG-17256: install necessary base OS package to make Knit rendering of R markup to PDF possible Dec 23, 2024
@jiridanek
Copy link
Member

/lgtm
/approve
thanks +💯

Copy link
Contributor

openshift-ci bot commented Dec 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jiridanek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit ffc8809 into opendatahub-io:main Dec 23, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rendering Rmd Markup to pdf not working
4 participants